const path = require('path');

const common = require('./webpack.common');

const { merge } = require('webpack-merge');

const PORT = process.env.PORT || 8888;

module.exports = merge(common, {
  mode: 'development',
  devtool: 'inline-source-map',
  devServer: {
    port: PORT,
    host: '0.0.0.0',
    hot: true,
    historyApiFallback: true,
    proxy: {
      '/api': 'http://localhost:3000',
    }
  },
});
